import React from 'react'
import {NavLink} from 'react-router-dom'
function Web(Com) {
    const token=localStorage.getItem('token')
  return ()=>{
    if(token){
        return <Com/>
    }else {
        return <NavLink to='/login'></NavLink>
    }
  }
}

export default Web